PLCopen State Machine
- This combination of motion profiles is useful in building a more complicated profile or in handling exceptions within a program.
- In real implementations there can be additional states defined at a lower level.
- The basic rule is that motion commands are always taken sequentially, even if the PLC has the capability of real parallel processing.
- These commands act on the state diagram of the axis.
- The axis is always in one of the defined states.
- A change of state is reflected immediately when issuing the corresponding motion command.
- The response time of immediately is system dependent.
The defined seven states are:
- Continuous Motion
- Discrete Motion
- Error Stop
- Homing
- Stand Still
- Stopping
- Synchronized Motion
Figure 1: Motion State Machine (PLCopen)
Notes
- In the ErrorStop or Stopping state, all function blocks can be called, although they are not executed.
The exceptions are MC_Reset and Error which generate the transition to StandStill or ErrorStop respectively. - MC_Power FB is called with Enable=TRUE and there is an error in the Axis.
- MC_Power FB is called with Enable=TRUE and there is no error in the Axis.
- MC_Stop.Done and not MC_Stop Execute.
State Machine for Multi-axes Motion Control
The diagram is focused on a single-axis.
- The multi-axes function blocks (e.g., MC_CamIn, MC_GearIn, or MC_Phasing) can be looked at, from a state diagram point of view, as multiple single-axes all in specific states.
- Example: The CAM-master can be in the state Continuous Motion.
- The corresponding slave is in the state Synchronized Motion.
- Connecting a slave axis to a master axis has no influence on the master axis.
A normal procedure starts in StandStill.
- In this state the power can be switched on per axis (via the MC_Power command).
- Access the Homing state (via the issue of the command Home per axis).
This returns to StandStill after normal completion. - From here, transfer an axis to either Discrete Motion or Continuous Motion.
- Via the Stopping state you can return to StandStill.
- ErrorStop is a state to which the axis transfers in case of error.
- Via a (manual) MC_ResetError command, return to StandStill.
- From this state, the machine can be moved to an operational state again.
- Access the Homing state (via the issue of the command Home per axis).
The States define the functionality of the function blocks.
- Function Blocks not listed in the State Diagram do not affect the state of the axis.
- This means that, whenever they are called, the state does not change.
- They are:
Disabled State
The Disabled state describes the initial state of the axis.
Disable means power off without error.
- In this state, the movement of the axis is not influenced by the FBs.
- The axis feedback is operational.
- If the MC_Power FB is called with Enable=TRUE while being in Disabled, this leads to either:
- Standstill if there is no error inside the axis.
- ErrorStop if an error exists.
- Calling MC_Power with Enable=FALSE in any state, the axis goes to the state Disabled, either directly or via any other state.
- If a motion generating FB controls an axis while the MC_Power FB with Enable=FALSE is called, the motion generating FB is aborted (CommandAborted).
ErrorStop State
The ErrorStop state is the axis goes to a stop, if possible.
- No further FBs are accepted until a reset has been done from the ErrorStop state.
- The transition Error refers to errors from the axis and axis control, and not from the function block instances.
- These axis' errors are reflected in the output of the function blocks FB instances errors.
- Issuing MC_Home in any other state than StandStill goes to ErrorStop, even if MC_Home is issued from the Homing state itself.
- ErrorStop is valid as highest priority and applicable in case of an error.
- The axis can have either power enabled or disabled, and can be changed via MC_Power.
- However, as long as the error is pending, the state remains ErrorStop.
From StandStill to Stopping
StandStill is power on without an error.
- Calling the FB MC_Stop in state StandStill changes the state to Stopping and back to Standstill when Execute = FALSE.
- The Stopping state is kept as long as the input Execute = TRUE.
- The Done output is set when the stop ramp is finished.